def item2dict(itme) -> dict:
    data = itme.__dict__
    data.pop('_sa_instance_state')
    return data

STATUS_CODE = {
    200:'响应成功',
    203:'原价'
}

def request_data(data:dict=None,code=200):
    return {'code':200,'data':data,'msg':STATUS_CODE.get(code,'未知响应状态')}